#include<bits/stdc++.h>
using namespace std;
int main()
{
	char x;
	cin>>x;
	cout<<(char)(x+1)<<" "<<x<<" "<<(char)(x-1)<<endl;
	cout<<x+1<<" "<<(int)x<<" "<<x-1;
    return 0;
}

